<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  	<head>
        <title>P2P Fusion - Peerscape</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <meta name="generator" content="Peerscape" />
        <meta http-equiv="imagetoolbar" content="no" />

        <style type="text/css">
            <!-- 
            @import url(/static/css/core.css);
            @import url(/static/css/content.css);
            -->
        </style>
        <link rel="shortcut icon" type="image/x-icon" href="http://p2p-fusion.org/favicon.ico" />
    </head>
  	<body class="admin">
	    <div id="wrapper">
	        <div id="inner">
                <div id="topLinks">
                    <h5 class="hide">Personal tools</h5>
                    <ul>
                        <li>
                            <a id="admin" href="http://admin.hexlabel.net/">My Admin</a>
                        </li>
                        <li>
                            <a id="user" href="http://my.hexlabel.net/">My Profile</a>
                        </li>
                    </ul>
                    <div class="clr"><br/></div>
                </div>

                <div id="main">
                    <div class="inner" style="border: 2px solid ${safety_color}">
                        <div id="header">
                            <div class="left">
                                <h1 id="logo"><a href="http://my.hexlable.net/" accesskey="1">fusion</a></h1>
                                <h2 id="subtitle">Peerscape</h2>
                            </div>
                            <div class="right">
                                <div id="globalTools">
                                    <h5 class="hide">Global tools</h5>
                                </div>
                            </div>
                            <div class="clr"><br/></div>
                        </div>

                        <div id="content">
                            <div id="info">
                                <h2>Manage group</h2>
                                <div class="submessage">
                                    For group: <a href="http://${iid}.hexlabel.net/group/">${profile_fields['generic']['name']['values'][0]['value']}</a>
                                
                                </div>
                                <p class="instruction">
                                Select one or more members change settings.
                                </p>
                            </div>

                            <div class="section" id="members">
                                <h3>
                                    Members (${len(member_list['index'])})
                                    <span class="inlineNav">
                                        % if is_member:
                                            <a href="http://admin.hexlabel.net/invite_group/?iid=${iid}">Invite a new member</a>
                                        % endif
                                    </span>
                                </h3>
                                % if errors:
                                    <div class="alert">${message}</div>
                                % elif message:
                                    <div class="message">${message}</div>
                                % endif
                                % if len(member_list['index']) > 0:
                                    <form method="POST" action="http://admin.hexlabel.net/manage_group/" class="listForm">
                                        <input type="hidden" name="iid" value="${iid}"/>
                                        <ul>
                                            % for miid in member_list['index']:
                                                <li>
                                                    <input type="checkbox" class="checkbox" name="miid" value="${miid}"/>
                                                    <a href="http://${miid}.hexlabel.net/">
                                                        <img src="${member_list['items'][miid]['picture']}" alt="${member_list['items'][miid]['name']}" class="thumbnail"/>
                                                    
                                                    </a>
                                                    <a href="http://${miid}.hexlabel.net/">${member_list['items'][miid]['name']}</a>
                                                    <div class="roles">
                                                        % if 'admin' in member_list['items'][miid]['roles']:
                                                            <div class="role"><span class="admin">Admin</span></div>
                                                        % elif 'author' in member_list['items'][miid]['roles']:
                                                            <div class="role"><span class="author">Author</span></div>
                                                        % endif
                                                        % if member_list['items'][miid]['is_self']:
                                                            <div class="role"><span class="self">YOU</span></div>
                                                        % endif
                                                        % if member_list['items'][miid]['is_friend']:
                                                            <div class="role"><span class="friend">Friend</span></div>
                                                        % endif
                                                    </div>
                                                </li>
                                            % endfor
                                        </ul>
                                        <dl class="checkboxForm author">
                                            <dd class="buttons">
                                                <span>Author role:</span>
                                                <input type="submit" class="submit" name="grant_author" value="Grant"/>
                                                <input type="submit" class="submit" name="revoke_author" value="Revoke"/>
                                            </dd>
                                        </dl>
                                        <dl class="checkboxForm admin">
                                            <dd class="buttons">
                                                <span>Admin role:</span>
                                                <input type="submit" class="submit" name="grant_admin" value="Grant"/>
                                                <input type="submit" class="submit" name="revoke_admin" value="Revoke"/>
                                            </dd>
                                        </dl>
                                        <dl class="checkboxForm revoke">
                                            <dd class="buttons">
                                                <input type="submit" class="submit" name="revoke" value="Revoke membership"/>
                                            </dd>
                                        </dl>
                                        <div class="clr"><br/></div>
                                    </form>
                                % else:
                                    <ul>
                                        <li>No members.</li>
                                    </ul>
                                % endif
                            </div>
                        </div>
                    </div>
                </div>
    
                <div id="footer">
                    <div class="left">
                        <ul>
                            <li><a class="footer" href="http://p2p-fusion.org">Home</a></li>
                            <li><a class="footer" href="http://p2p-fusion.org/contact">Contact us</a></li>
                            <li><a class="footer" href="http://p2p-fusion.org/disclaimer">Disclaimer</a></li>
                        </ul>
                    </div>
                    <div class="right">
                        <p class="footerText">P2P-FUSION is co-funded by the European Union through the IST programme under FP6.</p>
                    </div>
                    <div class="clr"><br/></div>
                </div>
            </div>
	    </div>
	</body>
</html>


